import { getRequest, postRequest, postParamsRequest, putRequest, deleteRequest} from '@/utils/request.js';
// 登录接口
export const requst_post_login = data => postParamsRequest(`/customer/login`, data);
//游客登录接口
export const requst_post_Visitorlogin = data => postParamsRequest(`/customer/addVisitor`, data);
//餐桌获取接口
export const requst_get_tableInfo = data => getRequest(`/Foodtable/page?tableCondition=1`, data);
//菜单获取接口
export const requst_get_menuInfo = data => getRequest(`/categories`, data);
//完成的订单获取接口
export const requst_get_orderInfoByCustomerId = (customerId) => getRequest(`/order/listByCustomerId?customerId=${customerId}`);
//用户信息获取接口
export const requst_get_customerInfo = (token) => getRequest(`/customer/info?token=${token}`);
//订单生成接口
export const requst_post_Generateorders = data => postParamsRequest(`/order/add`,data);
//用户未完成的订单获取接口根据用户Id
export const requst_get_orderInfoBycustomerIdNo = (customerId) => getRequest(`/order/listByIdNo?customerId=${customerId}`);
//未完成的订单获取接口根据订单号
export const requst_get_orderInfoByorderId = (order_id) => getRequest(`/order/info?order_id=${order_id}`);
//菜谱订单生成接口1
// export const requst_post_menuorderByorderId = data =>  postParamsRequest(`/menu_order/save`, data);
export const requst_post_menuorderByorderId = data =>  postParamsRequest(`/menu_order/add`, data);
//订单结算生成接口
export const requst_post_Settlebills = data =>  putRequest(`/order/updata`, data);
//菜谱订单获取接口
export const requst_get_menuorder = order_id =>  getRequest(`/menu_order/info?order_id=${order_id}`);
//修改用户信息
export const requst_put_customerupdata = data =>  putRequest(`/customer/updata`, data);
//修改餐桌状态
export const requst_put_Foodtableupdata = data =>  putRequest(`/Foodtable/updata`, data);
